Skip to content

chore: continue with miden-base update (3154a3)#1815

Merged
juan518munoz merged 7 commits intoandrew-migrate-to-next-basefrom
jmunoz-migrate-to-next-base
Mar 2, 2026
Merged

chore: continue with miden-base update (3154a3)#1815
juan518munoz merged 7 commits intoandrew-migrate-to-next-basefrom
jmunoz-migrate-to-next-base

Conversation

@juan518munoz
Copy link
Collaborator

@juan518munoz juan518munoz commented Feb 20, 2026

Continue with node & base update to update the miden-base dependency to commit 0904e2c61.

Note:

@juan518munoz juan518munoz changed the title chore: continue with miden-base update chore: continue with miden-base update (0904e2c61) Feb 25, 2026
@juan518munoz juan518munoz added this to the v0.14 milestone Feb 26, 2026
@juan518munoz juan518munoz added the no changelog This PR does not require an entry in the `CHANGELOG.md` file label Feb 26, 2026
@juan518munoz juan518munoz force-pushed the jmunoz-migrate-to-next-base branch from a58d2f5 to bd0859a Compare February 26, 2026 18:56
@juan518munoz juan518munoz force-pushed the jmunoz-migrate-to-next-base branch from 0d25a9a to 6c10836 Compare February 26, 2026 21:36
/// Represents a `proto::rpc::SyncStateResponse` with fields converted into domain types.
/// Represents the composed result of `sync_notes`, `sync_chain_mmr`, and `sync_transactions`
/// with fields converted into domain types.
pub struct StateSyncInfo {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should move this elsewhere as it's no longer part of the domain

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree, maybe into crates/rust-client/src/sync/state_sync.rs since it's only used there.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should keep this at the rpc module level (ie move it up one more mod)

@juan518munoz juan518munoz marked this pull request as ready for review February 26, 2026 21:40
Comment on lines +57 to +59
# inputs are passed as foreign_procedure_inputs:
# [slot_id_prefix, slot_id_suffix, KEY, pad(10)]
exec.active_account::get_map_item
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we still push the storage slot here? Why was this changed to assumed inputs?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think both approaches test effectively the same, so no need to change it necessarily, but yeah not sure why this was generalized (now you can query any slot)


### Changes

* [BREAKING] Incremented MSRV to 1.91.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets add the API changes for the rpc trait

Comment on lines +57 to +70
struct StatusService;

#[async_trait::async_trait]
impl worker_status_api_server::WorkerStatusApi for StatusService {
async fn status(
&self,
_: tonic::Request<()>,
) -> Result<tonic::Response<proto::WorkerStatus>, tonic::Status> {
Ok(tonic::Response::new(proto::WorkerStatus {
version: env!("CARGO_PKG_VERSION").to_string(),
supported_proof_type: proto::ProofType::Transaction as i32,
}))
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to implement this? Maybe we can remove the status service if we don't use it.

Comment on lines +89 to +96
pub fn with_supports_all_types(self) -> Self {
let metadata = self.0.metadata().clone().with_supports_all_types();
let code = self.0.component_code().clone();
let slots = self.0.storage_slots().to_vec();
AccountComponent(
NativeAccountComponent::new(code, slots, metadata)
.expect("reconstructing component with updated metadata should not fail"),
)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method was removed from the AccountComponent struct so maybe we should remove it here as well, instead of working around it.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, let's remove this

Comment on lines +545 to +547
/// highest `block_num`. This replicates the old `SyncState` behavior where the node returned
/// the latest account commitment per account in the synced range.
fn derive_account_commitment_updates(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe rename this to something like derive_latest_commitments()? Also, I'd rather not reference the "old" implementation in the comments.

@juan518munoz juan518munoz changed the title chore: continue with miden-base update (0904e2c61) chore: continue with miden-base update (3154a3) Mar 2, 2026
Copy link
Collaborator

@igamigo igamigo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Good work. We can address the remaining comments once we merge this to the base branch

Comment on lines +57 to +59
# inputs are passed as foreign_procedure_inputs:
# [slot_id_prefix, slot_id_suffix, KEY, pad(10)]
exec.active_account::get_map_item
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think both approaches test effectively the same, so no need to change it necessarily, but yeah not sure why this was generalized (now you can query any slot)

/// Represents a `proto::rpc::SyncStateResponse` with fields converted into domain types.
/// Represents the composed result of `sync_notes`, `sync_chain_mmr`, and `sync_transactions`
/// with fields converted into domain types.
pub struct StateSyncInfo {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should keep this at the rpc module level (ie move it up one more mod)

Comment on lines +209 to +216
// Fallback for transactions with unauthenticated input notes: the node
// authenticates these notes during processing, which changes the transaction
// ID. Match by account ID and pre-transaction state instead.
if let Some(transaction) = self.transactions.values_mut().find(|tx| {
tx.details.account_id == transaction_inclusion.account_id
&& tx.details.init_account_state == transaction_inclusion.initial_state_commitment
}) {
transaction.commit_transaction(transaction_inclusion.block_num, timestamp);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not entirely sure we would need this, but I'll need to investigate more

Comment on lines +89 to +96
pub fn with_supports_all_types(self) -> Self {
let metadata = self.0.metadata().clone().with_supports_all_types();
let code = self.0.component_code().clone();
let slots = self.0.storage_slots().to_vec();
AccountComponent(
NativeAccountComponent::new(code, slots, metadata)
.expect("reconstructing component with updated metadata should not fail"),
)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, let's remove this

@juan518munoz juan518munoz merged commit 51ac780 into andrew-migrate-to-next-base Mar 2, 2026
29 checks passed
@juan518munoz juan518munoz deleted the jmunoz-migrate-to-next-base branch March 2, 2026 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no changelog This PR does not require an entry in the `CHANGELOG.md` file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants